//Saruman's Army
#include <stdio.h>
int main ()
{
	int n,r;
	int i,start=0,mark,count=0;
	scanf("%d %d",&n,&r);
	double x[n];
	mark=n-1;
	for(i=0;i<n;i++)
		scanf("%lf",&x[i]);
    for(i=start;i<n;i++)                                        
    {
        if(x[i]-x[start]<=r&&x[i+1]-x[start]>r)  {
        	mark=i;
        	count+=1;  } 
        if(x[i]-x[mark]>r)
	        start=i;       
	}
	printf("%d",count);
    return 0;    
}
